import {autoAddDictionary} from '~/plugins/Tools/autoStore';
const dictionary = {
  scale: [], // 客户的机构规模（人数）
  trades: [], // 客户所属行业名称
  type: [], // 客户性质名称
};

export const state = () => ({
  /**
   * {
   *    id     客户ID
   *    name   客户名称
   * }
   *
   */
  customers: [],
  ...autoAddDictionary('state', dictionary),
});

/**
 * CUSTOM/SET
 * CUSTOM/DEL
 *
 */

export const mutations = {
  SET: function (state, customers) {
    state.customers = customers;
  },
  ...autoAddDictionary('mutations', dictionary),
};
